package com.yuda.campsite.dto;

import com.yuda.common.core.annotation.Excel;
import org.springframework.util.StringUtils;

/**
 * 邀请码统计 二级菜单 下的导表
 */
public class InvCodeWithStuInfo {

    @Excel(name = "姓名")
    private String name;

    @Excel(name = "身份证号")
    private String idCard;

    @Excel(name = "手机号")
    private String phone;

    @Excel(name = "邀请码")
    private String code;

    @Excel(name = "邀请码状态")
    private String invStatus;

    @Excel(name = "订单状态")
    private String orderStatus;

    @Excel(name = "审核状态")
    private String examineStatus;

    //order原始状态
    private Integer tempOrderStatus;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getInvStatus() {
        return invStatus;
    }

    public void setInvStatus(String invStatus) {
        if (invStatus != null) {
            this.invStatus = invStatus.equals("2") ? "已使用" : "未使用";
        } else {
            this.invStatus = "未使用";
        }
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        if (!StringUtils.isEmpty(orderStatus)) {
            this.tempOrderStatus = Integer.parseInt(orderStatus);
            if (orderStatus.equals("5")) {
                this.orderStatus = "待支付";
            }
            if (orderStatus.equals("6")) {
                this.orderStatus = "报名完成";
            }
        } else {
            this.tempOrderStatus = -1;
        }
    }

    public String getExamineStatus() {
        return examineStatus;
    }

    public void setExamineStatus(String examineStatus) {
        if (examineStatus != null && examineStatus.equals("0")) {
            this.examineStatus = "未审核";
        }

        if (examineStatus != null && examineStatus.equals("1")) {
            this.examineStatus = "通过";
        }

        if (examineStatus != null && examineStatus.equals("2")) {
            this.examineStatus = "未通过";
        }
    }

    public Integer getTempOrderStatus() {
        return tempOrderStatus;
    }

    public void setTempOrderStatus(Integer tempOrderStatus) {
        this.tempOrderStatus = tempOrderStatus;
    }
}
